package com.fss.shopman.service.impl;

import java.util.List;
import com.fss.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fss.shopman.mapper.ShopmanMapper;
import com.fss.shopman.domain.Shopman;
import com.fss.shopman.service.IShopmanService;

/**
 * 店铺信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-02
 */
@Service
public class ShopmanServiceImpl implements IShopmanService 
{
    @Autowired
    private ShopmanMapper shopmanMapper;

    /**
     * 查询店铺信息
     * 
     * @param shopId 店铺信息主键
     * @return 店铺信息
     */
    @Override
    public Shopman selectShopmanByShopId(Long shopId)
    {
        return shopmanMapper.selectShopmanByShopId(shopId);
    }

    /**
     * 查询店铺信息列表
     * 
     * @param shopman 店铺信息
     * @return 店铺信息
     */
    @Override
    public List<Shopman> selectShopmanList(Shopman shopman)
    {
        return shopmanMapper.selectShopmanList(shopman);
    }

    /**
     * 新增店铺信息
     * 
     * @param shopman 店铺信息
     * @return 结果
     */
    @Override
    public int insertShopman(Shopman shopman)
    {
        shopman.setCreateTime(DateUtils.getNowDate());
        return shopmanMapper.insertShopman(shopman);
    }

    /**
     * 修改店铺信息
     * 
     * @param shopman 店铺信息
     * @return 结果
     */
    @Override
    public int updateShopman(Shopman shopman)
    {
        shopman.setUpdateTime(DateUtils.getNowDate());
        return shopmanMapper.updateShopman(shopman);
    }

    /**
     * 批量删除店铺信息
     * 
     * @param shopIds 需要删除的店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteShopmanByShopIds(Long[] shopIds)
    {
        return shopmanMapper.deleteShopmanByShopIds(shopIds);
    }

    /**
     * 删除店铺信息信息
     * 
     * @param shopId 店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteShopmanByShopId(Long shopId)
    {
        return shopmanMapper.deleteShopmanByShopId(shopId);
    }
}
